/**2013-4-11
 zhangqj
 * 
 */
package net.spring.controller;

 

import java.util.HashMap;
import java.util.Map;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.log4j.Logger;
import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.mvc.Controller;



/**
 * @author zhangqj
 *2013-4-11
 */    
public  class helloworldAction implements Controller{

	private Logger logger =Logger.getLogger(this.getClass().getName());
	private String helloWorld=null;
	private String viewPage=null;
	public String getHelloWorld() {
		return helloWorld;
	}
	public void setHelloWorld(String helloWorld) {
		this.helloWorld = helloWorld;
	}
	public String getViewPage() {
		return viewPage;
	}
	public void setViewPage(String viewPage) {
		this.viewPage = viewPage;
	}
	
	/* (non-Javadoc)
	 * @see org.springframework.web.servlet.mvc.Controller#handleRequest(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
	 */
	@Override
	public ModelAndView handleRequest(HttpServletRequest arg0,
			HttpServletResponse arg1) throws Exception {
		Map model=new HashMap();
		model.put("helloWorld", getHelloWorld());
		// TODO Auto-generated method stub
		return new ModelAndView(getViewPage(),model);
	}
	public Logger getLogger() {
		return logger;
	}
	public void setLogger(Logger logger) {
		this.logger = logger;
	}

 
 
 
 
	    

}
